package com.hzqy.persistence.dao.label;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.CmCatalogVo;
import com.hzqy.web.vo.CmLabelVo;

@Repository
public class LabelDao extends PersistenceDao<CmLabelVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(LabelDao.class);
	
	public int deleteLabel(int f_label_id) {
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "deleteLabel", f_label_id);
	}
	
	public int insertLabel(CmLabelVo labelVo) {
		return getSqlSession().insert(this.getNamespace() + "insertLabel", labelVo);
	}
	
	public int updateLabel(CmLabelVo labelVo) {
		return getSqlSession().update(this.getNamespace() + "updateLabel", labelVo);
	}
	
	public CmLabelVo selectLabel(int f_label_id) {
		return getSqlSession().selectOne(this.getNamespace() + "selectLabel", f_label_id);
	}
	
	public List<CmLabelVo> selectLabelList(CmLabelVo labelVo){
		return getSqlSession().selectList(this.getNamespace() + "selectLabelList", labelVo);
	}
	
}
